<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Hexo</title><meta name="author" content="Joey"><meta name="copyright" content="Joey"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="https://jonhsean.gitee.io/blog/page/2/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="Joey">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/blog/img/favicon.png"><link rel="canonical" href="https://jonhsean.gitee.io/blog/page/2/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/blog/css/index.css"><link rel="stylesheet" href="https://unpkg.com/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://unpkg.com/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/blog/',
  algolia: undefined,
  localSearch: {"path":"/blog/search.xml","preload":false,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":100,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"简"},
  noticeOutdate: {"limitDay":180,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":200},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://unpkg.com/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://unpkg.com/flickr-justified-gallery/dist/fjGallery.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: false,
  isAnchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Hexo',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2022-10-14 22:02:18'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.2"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">21</div></a><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">26</div></a><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">30</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li></ul></div></div></div></div><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog_name"><a id="site-name" href="/blog/">Hexo</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/blog/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/10/10/daily/npm%E5%8C%85/" title="局部使用包&amp;快删modules">局部使用包&amp;快删modules</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-10T09:41:50.000Z" title="发表于 2022-10-10 17:41:50">2022-10-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/npm/">npm</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/npm/node-modules/">node_modules</a></span></div><div class="content">局部使用如 使用局部安装的 hexo 命令：
 ./node_modules/hexo-cli/bin/hexo -v
快速删除node_modules手动删除真的很慢

安装： npm install rimraf -g

使用：rimraf node_modules
rimraf是node的一个包，可以快速删除node_modules，再也不用等半天了


</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/10/10/daily/npm%E7%9B%B8%E5%85%B3/" title="包管理安装">包管理安装</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-10T09:11:24.000Z" title="发表于 2022-10-10 17:11:24">2022-10-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/node/">node</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/node/yarn/">yarn</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/node/npm/">npm</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/node/cnpm/">cnpm</a></span></div><div class="content">包管理工具下载安装cnpm1、确认npm是否安装 npm -v
2、确定node 是否安装 node -v
3、安装 npm install -g cnpm --registry=https://registry.npm.taobao.org
4、 检查是否安装成功 ： cnpm -v

失败则配置环境变量


yarn
下载node.js，使用 npm安装npm install -g yarn查看版本：yarn --version

下载yarn的安装程序:提供一个.msi文件，在运行时将引导您在Windows上安装Yarn

Yarn 淘宝源安装，分别复制粘贴以下代码行到黑窗口运行即可

yarn config set registry https://registry.npm.taobao.org -g


全局安装： 关键字 global




一些命令：
安装包

yarn install //安装package.json里所有包，并将包及它的所有依赖项保存进yarn.lock
yarn install --flat //安装一个包的单一版本
yarn install -- ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/10/10/daily/nvm/" title="nvm">nvm</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-10T09:08:17.000Z" title="发表于 2022-10-10 17:08:17">2022-10-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/node/">node</a></span></div><div class="content">nvm
管理多个 node 的 工具，使得一台 pc 可以使用不同版本的 node来工作

1234567891011121314151617#查看安装了哪些nodenvm ls                      // 看安装的所有node.js的版本#查看线上可以安装的node版本nvm list available          // 查显示可以安装的所有node.js的版本#安装指定node版本nvm install 版本号  // 例如：nvm install 14.19.0#切换到安装的node指定版本nvm use 版本号#检测是否切换完成(新开一个cmd)node -vnvm alias &lt;name&gt; &lt;version&gt; ## 给不同的版本号添加别名nvm unalias &lt;name&gt; ## 删除已定义的别名


注意：使用前先把 安装的 node 卸载掉

</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/10/10/daily/node-win7/" title="node不支持win7">node不支持win7</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-10T09:03:41.000Z" title="发表于 2022-10-10 17:03:41">2022-10-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/node/">node</a></span></div><div class="content">node 版本 v13不支持 win7问题-     win7安装高版本会报错 :
 无法定位到程序输入点 gethostnamew ws2_32.dll  

原因-  旧代码中没有 xx 函数导致的报错
etc:  没有功能（或类似功能）。libuv v1.40 v1.41 ws2_32.dll GetHostNameW

解决办法：
转到Node下载
下载 Windows Binary (.zip)（32/64 位）
将其解压缩到node安装的目录中，然后点击“是”以替换所有文件（请记住，zip带有，它位于目录中;我没有从zip复制，因为我在替换文件之前已经更新了npm）npm node_modules/npm
对于NVM 则是解压到 命名为 v + node版本号 的目录中


创建一个名为：NODE_SKIP_PLATFORM_CHECK的环境变量，并将其设置为1
或者 cmd 中输入 set NODE_SKIP_PLATFORM_CHECK 1


现在准备好在 Windows 7 中使用node。

</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/09/29/daily/sql/" title="sql笔记1">sql笔记1</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-29T06:15:59.000Z" title="发表于 2022-09-29 14:15:59">2022-09-29</time></span></div><div class="content">SQL ： 结构化查询语言 （Structured Query Language）
1. 语法
查询： 

1234567891011121314151617181920212223#查表A,中所有数据SELECT *        # * ：可为表中列名，如 id ,name,age ,heightFROM tableName; #tableName 为查询的表名，语句用分号结束。# 表A 形如：id | name | age | height___+______+_____+_______1  | Bob  |  42 |  1.72#Ex1 查表 某列SELECT name,age      # 查询name,age 这两列数据FROM A;#Ex2  查表 某列特定值： name=&#x27;Bob&#x27;的数据SELECT nameFROM B               # 这里没有分号，语句未结束WHERE name=&#x27;Bob&#x27;;    # WHERE为条件语句 	#结果：        name        _____        Bob

 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/09/25/daily/ssh/" title="ssh相关问题">ssh相关问题</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-25T15:03:24.000Z" title="发表于 2022-09-25 23:03:24">2022-09-25</time></span></div><div class="content">Q:  gitee 不能添加已被Github使用的SSH公钥解决： 生成一个新的 秘钥；先给 gitee用 在给 github用

Q: 生成多个 SSH 并分别连接使用：参考：在GitHub多个帐号上添加同一台机器的SSH公钥

生成一个新的SSH (只是把生成的文件名重命名)

ssh-keygen -t rsa -C &#39;邮箱&#39; 
回车后：输入目标路径+重命名文件名  （下图输入文件名为 ~/xxx2）
1Enter file in which to save the key (~/.ssh/id_rsa): #这里输入重命名的文件名 如 id_rsa2


将生成的 ssh 公钥添加到网站上

本地 秘钥目录./ssh  建立文件 config 将秘钥文件与目标网站链接
123456789101112131415# config文件插入以下内容，多个账号可以配置多组，中间建议间隔一行# Host 为使用ssh时的别名，在之后配置仓库远程地址时用到# HostName 为远程仓库的域名# User 一般为git，了解到好像填其他的也没太大影响# IdentityFi ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/08/26/daily/cssUitls/" title="css预编语言">css预编语言</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-26T10:03:08.000Z" title="发表于 2022-08-26 18:03:08">2022-08-26</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/css/">css</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/css/%E9%A2%84%E5%A4%84%E7%90%86%E5%99%A8/">预处理器</a></span></div><div class="content">是什么预处理语言是 CSS 的超集，包含一套自定义的语法及一个解析器，根据这些语法定义自己的样式规则，这些规则最终会通过解析器，编译生成对应的 CSS 文件。

扩充了css语言，增加了 变量，混合，函数等功能。让css 更易维护

有哪些
sass


birth in 07  已经进化到全面兼容 css 的 Scss  。 主阵地：Ruby 社区


less


birth in 09  主阵地： Ruby社区外。 缺点：相比SASS编程功能不够


stylus


birth in 10   主阵地：Node.js社区。主要用来给 Node项目进行css预处理支持

区别主要运用如下功能：

变量 （variables） |  作用域 ( scope )  |  代码混合 （mixins） 


混入: 将一部分样式抽出，作为单独定义的模块，供其他选择器重复使用


嵌套（nested rules） |  代码模块化 （Modules）


模块化：将css代码分为一个个模块。 使用方式如下：
@import ‘./common’ ;@import ‘./mixin’@imp ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/08/26/daily/%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B0/" title="小程序初学笔记">小程序初学笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-25T16:05:37.000Z" title="发表于 2022-08-26 00:05:37">2022-08-26</time></span></div><div class="content">轮播图组件Swiper根据官方API
swiper 是滑块视图容器 ，只可放置swiper-item组件 。

swiper-item : 宽高会自动设置为100%。
其属性在v1.9.0版有：

 item-id ：string 型， 为该项标识符

skip-hidden-item-layout ：boolean型，是否跳过未显示的滑块布局



通过给swiper 设置其属性 如 autoplay: true;  就会自动播放。
so, 使用方式就是通过给各个标签设置 class名  , 用样式来控制显示形式。
用属性控制行为，用事件控制变化等。

v1.0.0版 部分属性如下：
indicator-dots  [false] ; 是否显示面板指示点
autoplay  [false] ; 是否自动切换
interval [5000] ; 自动切换时间间隔
duration [500] ;   滑动动画时长
 current [0 : number] ;  当前所在滑块的 index

代码如下:123456789101112&lt;view class=&quot;page-s ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/08/25/daily/%E5%8C%85%E7%AE%A1%E7%90%86/" title="npm参数">npm参数</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-25T09:47:15.000Z" title="发表于 2022-08-25 17:47:15">2022-08-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/NPM/">NPM</a></span></div><div class="content">npm ii :  instanll命令简写形式
12npm i X 　　　　　　　　     # 安装模块到项目目录下,(即局部安装)npm i X -g 　　　　　　     # 将模块全局安装，具体安装到磁盘哪个位置，要看 npm config prefix 的位置。

12345678npm i X -D(--save-dev)　  # 开发依赖： 在package文件的devDependencies节点写入依赖。#如gulp ，压缩css、js的模块等,开发需要，生产不需要。npm i X -S(-save) 　　　 　# 生产依赖： 在package文件的dependencies节点写入依赖。 # 之后运行npm i --production或者# 注明NODE_ENV变量值为production时，会自动安装msbuild到node_modules目录中,即是在线上环境运行时会将包安装npm i   #安装package文件中的所有依赖

总结：项目运行时需要用到的包使用–S，否则使用–D。

productionnpm i --production :   npm 将不 ...</div></div></div><div class="recent-post-item"><div class="recent-post-info no-cover"><a class="article-title" href="/blog/2022/08/25/daily/tabBar-wx/" title="自定义tabBar">自定义tabBar</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-08-25T09:20:02.000Z" title="发表于 2022-08-25 17:20:02">2022-08-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/">微信小程序</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/%E8%87%AA%E5%AE%9A%E4%B9%89/">自定义</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/vant-UI/">vant UI</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/blog/categories/vant-UI/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/">微信小程序</a></span></div><div class="content">tabBar的自定义配置前言： 按微信官方文档配置，搭配 vant UI 库的 tabBar样式，
可一键跳转至详细tabBar代码位置 点击
引入 vant UI安装vant1. 下载包12345678# 通过 npm 安装npm i @vant/weapp -S --production# 通过 yarn 安装yarn add @vant/weapp --production# 安装 0.x 版本npm i vant-weapp -S --production

2. 修改 app.json将 app.json 中的 &quot;style&quot;: &quot;v2&quot; 去除
3.  修改 project.config.json添加如下配置：
12345678910111213&#123;  ...  &quot;setting&quot;: &#123;    ...    &quot;packNpmManually&quot;: true,  // true    &quot;packNpmRelationList&quot;: [      &#123;     ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/blog/"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/blog/">1</a><span class="page-number current">2</span><a class="page-number" href="/blog/page/3/#content-inner">3</a><a class="extend next" rel="next" href="/blog/page/3/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/10/14/daily/kotlin_%E5%B0%8F%E9%AD%94%E6%9C%AF/" title="小技巧-kotlin基础(六)"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="小技巧-kotlin基础(六)"/></a><div class="content"><a class="title" href="/blog/2022/10/14/daily/kotlin_%E5%B0%8F%E9%AD%94%E6%9C%AF/" title="小技巧-kotlin基础(六)">小技巧-kotlin基础(六)</a><time datetime="2022-10-14T07:46:01.000Z" title="发表于 2022-10-14 15:46:01">2022-10-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/10/14/daily/kotlin_%E7%A9%BA%E6%8C%87%E9%92%88%E6%A3%80%E6%9F%A5/" title="空指针检查-kotlin基础(五)"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="空指针检查-kotlin基础(五)"/></a><div class="content"><a class="title" href="/blog/2022/10/14/daily/kotlin_%E7%A9%BA%E6%8C%87%E9%92%88%E6%A3%80%E6%9F%A5/" title="空指针检查-kotlin基础(五)">空指针检查-kotlin基础(五)</a><time datetime="2022-10-14T07:43:10.000Z" title="发表于 2022-10-14 15:43:10">2022-10-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/10/14/daily/kotlin_lambda%E7%BC%96%E7%A8%8B/" title="Lambda编程-kotlin基础(四)"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="Lambda编程-kotlin基础(四)"/></a><div class="content"><a class="title" href="/blog/2022/10/14/daily/kotlin_lambda%E7%BC%96%E7%A8%8B/" title="Lambda编程-kotlin基础(四)">Lambda编程-kotlin基础(四)</a><time datetime="2022-10-14T07:23:56.000Z" title="发表于 2022-10-14 15:23:56">2022-10-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/10/14/daily/kotlin_classSPEC/" title="面向对象3:数据类和单例类-kotlin基础(三)"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="面向对象3:数据类和单例类-kotlin基础(三)"/></a><div class="content"><a class="title" href="/blog/2022/10/14/daily/kotlin_classSPEC/" title="面向对象3:数据类和单例类-kotlin基础(三)">面向对象3:数据类和单例类-kotlin基础(三)</a><time datetime="2022-10-14T07:18:42.000Z" title="发表于 2022-10-14 15:18:42">2022-10-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2022/10/14/daily/kotlin_interface/" title="面向对象2:接口-kotlin基础(三)"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/blog/img/404.jpg'" alt="面向对象2:接口-kotlin基础(三)"/></a><div class="content"><a class="title" href="/blog/2022/10/14/daily/kotlin_interface/" title="面向对象2:接口-kotlin基础(三)">面向对象2:接口-kotlin基础(三)</a><time datetime="2022-10-14T07:14:52.000Z" title="发表于 2022-10-14 15:14:52">2022-10-14</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/blog/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/NPM/"><span class="card-category-list-name">NPM</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/css/"><span class="card-category-list-name">css</span><span class="card-category-list-count">1</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/css/%E9%A2%84%E5%A4%84%E7%90%86%E5%99%A8/"><span class="card-category-list-name">预处理器</span><span class="card-category-list-count">1</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/hexo/"><span class="card-category-list-name">hexo</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/kotlin/"><span class="card-category-list-name">kotlin</span><span class="card-category-list-count">10</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/kotlin/Lambda/"><span class="card-category-list-name">Lambda</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/kotlin/oop/"><span class="card-category-list-name">oop</span><span class="card-category-list-count">3</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/kotlin/oop/data-singelton-class/"><span class="card-category-list-name">data&singelton class</span><span class="card-category-list-count">1</span></a></li></ul></li></ul></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/blog/tags/Java%E5%87%BD%E6%95%B0%E5%BC%8FAPI/" style="font-size: 1.1em; color: #999">Java函数式API</a> <a href="/blog/tags/cnpm/" style="font-size: 1.1em; color: #999">cnpm</a> <a href="/blog/tags/css/" style="font-size: 1.1em; color: #999">css</a> <a href="/blog/tags/gethostname/" style="font-size: 1.1em; color: #999">gethostname</a> <a href="/blog/tags/hexo/" style="font-size: 1.1em; color: #999">hexo</a> <a href="/blog/tags/kotlin%E5%9F%BA%E7%A1%80/" style="font-size: 1.5em; color: #99a9bf">kotlin基础</a> <a href="/blog/tags/kotlin%E6%8A%80%E5%B7%A7/" style="font-size: 1.23em; color: #999ea6">kotlin技巧</a> <a href="/blog/tags/kotlin%E9%9B%86%E5%90%88/" style="font-size: 1.1em; color: #999">kotlin集合</a> <a href="/blog/tags/less/" style="font-size: 1.1em; color: #999">less</a> <a href="/blog/tags/node/" style="font-size: 1.37em; color: #99a4b2">node</a> <a href="/blog/tags/node-modules/" style="font-size: 1.1em; color: #999">node_modules</a> <a href="/blog/tags/node%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80/" style="font-size: 1.1em; color: #999">node下载地址</a> <a href="/blog/tags/npm/" style="font-size: 1.37em; color: #99a4b2">npm</a> <a href="/blog/tags/nvm/" style="font-size: 1.1em; color: #999">nvm</a> <a href="/blog/tags/sass/" style="font-size: 1.1em; color: #999">sass</a> <a href="/blog/tags/scss/" style="font-size: 1.1em; color: #999">scss</a> <a href="/blog/tags/stylus/" style="font-size: 1.1em; color: #999">stylus</a> <a href="/blog/tags/tabBar/" style="font-size: 1.1em; color: #999">tabBar</a> <a href="/blog/tags/vant-UI/" style="font-size: 1.1em; color: #999">vant UI</a> <a href="/blog/tags/win7/" style="font-size: 1.1em; color: #999">win7</a> <a href="/blog/tags/ws2-32-dll/" style="font-size: 1.1em; color: #999">ws2_32.dll</a> <a href="/blog/tags/wx-%E5%B0%8F%E7%A8%8B%E5%BA%8F/" style="font-size: 1.1em; color: #999">wx-小程序</a> <a href="/blog/tags/yarn/" style="font-size: 1.23em; color: #999ea6">yarn</a> <a href="/blog/tags/%E5%B1%80%E9%83%A8%E4%BD%BF%E7%94%A8/" style="font-size: 1.1em; color: #999">局部使用</a> <a href="/blog/tags/%E7%BC%96%E8%AF%91%E5%9E%8B%E8%AF%AD%E8%A8%80/" style="font-size: 1.1em; color: #999">编译型语言</a> <a href="/blog/tags/%E8%A7%A3%E9%87%8A%E5%9E%8B%E8%AF%AD%E8%A8%80/" style="font-size: 1.1em; color: #999">解释型语言</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2022/10/"><span class="card-archive-list-date">十月 2022</span><span class="card-archive-list-count">14</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2022/09/"><span class="card-archive-list-date">九月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2022/08/"><span class="card-archive-list-date">八月 2022</span><span class="card-archive-list-count">5</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">21</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2022-08-20T16:00:00.000Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">14.8k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-10-14T14:02:17.934Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2022 By Joey</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/blog/js/utils.js"></script><script src="/blog/js/main.js"></script><script src="/blog/js/tw_cn.js"></script><script src="https://unpkg.com/@fancyapps/ui/dist/fancybox.umd.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://unpkg.com/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script src="/blog/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://unpkg.com/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><script src="https://unpkg.com/butterfly-extsrc/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = true;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://unpkg.com/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="true"></script><script src="https://unpkg.com/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"]):not([href="/music/"]):not([href="/no-pjax/"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>